package threading;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: lishuo
 * Date: 2023-03-26
 * Time: 17:31
 */
public class ThreadExample_status {
    public static void main(String[] args) {
        Thread t = new Thread(() -> {
//            while (true) {
//
//            }
            System.out.println("hello t");
        });
        // NEW
        System.out.println(t.getState());

        t.start();

        try {
            Thread.sleep(3000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        // RUNNABLE 或 TERMINATED
        System.out.println(t.getState());

    }
}
